<?php
namespace App\Admin\Tools;

use Encore\Admin\Facades\Admin;
use Encore\Admin\Grid\Tools\AbstractTool;

class WithdrawExportTool extends AbstractTool
{
	protected function script()
	{
		return <<<EOT
$('#withdraws-export').change(function () {
	let url = $(this).find('option:selected').val();
	if (url !== '0') {
		location.href = url;
	}
});
EOT;

	}

	public function render()
	{
		Admin::script($this->script());

		$options = [];
		return view('admin.tools.withdrawexport', compact('options'));
	}
}